<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			if (this.token) {
				this.$uniApi.tipMsg();
			}
		},
		onShow: function() {
			console.log('App Show');
			const updateManager = uni.getUpdateManager();

			updateManager.onCheckForUpdate(function(res) {
				// 请求完新版本信息的回调
				console.log(res.hasUpdate);
			});

			updateManager.onUpdateReady(function(res) {
				uni.showModal({
					title: '更新提示',
					content: '新版本已经准备好，是否重启应用？',
					success(res) {
						if (res.confirm) {
							// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
							updateManager.applyUpdate();
						}
						if (res.cancel) {
							updateManager.applyUpdate();
						}
					}
				});

			});

			updateManager.onUpdateFailed(function(res) {
				// 新的版本下载失败
			});
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	@import './static/css/common.scss';

	.topxian {
		border-bottom: 1px solid #f2f2f2;
		width: 100%;
		position: fixed;
		z-index: 9999;
		top: 44px;
		/* #ifdef APP-PLUS || MP */
		top: var(--status-bar-height + 44);
		/* #endif */
	}
	.suspen {
		position: fixed;
		bottom: 10rpx;
	}
	/*每个页面公共css */
	.dis {
		display: flex;
		justify-content: space-between;
	}

	.right-fu {
		width: 12rpx;
		height: 22rpx;

	}

	.padding30rpx {
		padding: 30rpx;
	}

	.fontSize32rpx {
		font-size: 32rpx;
		color: #333333;
		margin: 25rpx 0;
	}

	.line {
		border-bottom: 1rpx solid #DDDDDD;
		width: 100%;
	}

	.flexc {
		display: flex;
		flex-wrap: wrap;
	}

	.hui99 {
		font-size: 24rpx;
		color: #999999;
	}

	.hui66 {
		font-size: 28rpx;
		color: #999999;
	}

	.hui66lv {
		font-size: 24rpx;
		color: #00A29A;
	}

	.fontSize40rpx {
		font-size: 40rpx;
	}

	.align-items {
		align-items: center;
	}

	//省略2行
	.clamp {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;

	}

	//省略5行
	.clamp5 {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 5;
		overflow: hidden;

	}

	//省略3行
	.clamp3 {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		overflow: hidden;

	}

	//省略1行
	.clamp1 {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.margin-top25rpx {
		margin-top: 25rpx;
	}

	.nuto {
		width: 100%;
		height: 10rpx;
		margin-top: 20rpx;
		background-color: #F4F4F4;
	}

	//到底了
	.dao {
		font-size: 22rpx;
		color: #999999;
		text-align: center;
		margin-top: 60rpx;
		margin-bottom: 60rpx;
	}


	uni-checkbox-group {
		width: 100% !important;
	}

	uni-checkbox-group uni-label {
		width: 33% !important;
		display: inline-flex;
		margin-bottom: 20rpx;
	}

	/*checkbox 选项框大小  */
	uni-checkbox .uni-checkbox-input {
		width: 35rpx !important;
		height: 35rpx !important;
		border-radius: 50%;
	}

	/*checkbox选中后样式  */
	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
		background: #00a29a;
		border-color: #00a29a;
	}

	/*checkbox选中后图标样式  */
	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
		width: 20rpx;
		height: 20rpx;
		border-radius: 50%;
		line-height: 20rpx;
		text-align: center;
		font-size: 18rpx;
		color: #fff;
		background: transparent;
		transform: translate(-70%, -50%) scale(1);
		-webkit-transform: translate(-70%, -50%) scale(1);
	}
</style>
